<?php
global $isHome, $SilasFlickrPlugin;
?>

<div id="sidebar"><div id="sidebar2"><div id="sidebar3">

<?php
require_once(dirname(__FILE__).'/../../plugins/silaspartners/flickr/class-public.php');
if (!is_object($SilasFlickrPlugin)) $SilasFlickrPlugin =& new SilasFlickrPlugin();

$photos = $SilasFlickrPlugin->getRecentPhotos('tantan');
shuffle($photos);
for ($i=0;$i<2;$i++):
$photo = array_pop($photos);
?>
<?php if ($photo && $photo['sizes']['Square']['source']):?>
<div class="framed framed-<?php echo $i;?>"><img title="a random pic of me" src="<?php echo $photo['sizes']['Square']['source'];?>" width="<?php echo $photo['sizes']['Square']['width'];?>" height="<?php echo $photo['sizes']['Square']['height'];?>" />
<a class="frame frame-<?php echo $i;?>" href="/photos/photo/<?php echo $photo['id'];?>/<?php echo $photo['pagename'];?>" title="<?php echo $photo['title'];?>"><?php echo $photo['title'];?></a>
</div>
<?php 
endif;
endfor;
?>



<?php if ($isHome):?>
<div id="about" class="block">
<h4>About Joe Tan</h4>
<p>Hey, somehow you've found my personal blog (cool!). I should probably mention that opinions expressed here on this blog are my own and not of my employer, though I will occasionally mention the stuff I do at <a href="http://www.trinetsolutions.com">work</a>.</p>
<p>
So who am I? Web developer, guitar player, worship leader, music listener, bike rider, video gamer, 
Apple lover, wordpress blogger, Bloglines user, <s>snowboarder</s> downhill skier, 
<s>available</s> bachelor, movie watcher, Canucks follower, <s>Vi</s> <s>Emacs</s> Pico hater, and last but definately not least, from Vancouver.  
These are just a few of the <nobr>-er's</nobr> that <a href="/about/">describe me</a>, most of which have been verified to be true. 
</p>
</div>
<?php else:?>
<?php /* <h4>About Joe Tan</h4>
*/
?>
<?php endif; ?>

<div id="site-search" class="block">
<h4>Site Search</h4>
<!-- SiteSearch Google -->
<form action="/search/" id="searchbox_000875665089887005605:obmxor6f3ew">
  <input type="hidden" name="cx" value="000875665089887005605:obmxor6f3ew" />
  <input type="hidden" name="cof" value="FORID:11" />
  <input type="text" name="q" size="25" value="<?php echo (isset($_GET['q']) ? htmlentities($_GET['q']) : '');?>" />
  <input type="submit" name="sa" value="Search" />
</form>
<script defer="defer" type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_000875665089887005605%3Aobmxor6f3ew&lang="></script>

</div>

<div id="sidebar-adsense" class="block">
<h4>Advertisements</h4>
<div class="code"><script type="text/javascript"><!--
google_ad_client = "pub-3390402430226178";
/* 234x60, created 2/12/08, sidebar, tantan2 */
google_ad_slot = "9175411177";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
</div>

<div class="yui-g">
<div id="" class="yui-u first">

<div id="sidebar-archives" class="block">
<h4>Archives</h4>
<?php
global $wpdb;
$archives = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts ".
	"FROM $wpdb->posts ".
	"WHERE post_type = 'post' AND post_status = 'publish' ".
	"GROUP BY YEAR(post_date), MONTH(post_date) ".
	"ORDER BY post_date DESC ".
	"LIMIT 100");
?>
    <ul class="archives">
    <?php
    $year = false;
    foreach ($archives as $a):?>
    	<?php if ($year != $a->year): $year = $a->year;?>
    	<li class="year"><strong><?php echo $year;?></strong></li>
    	<?php endif;?>
    <li class="month"><a href="<?php echo get_month_link($a->year, $a->month);?>" title=""><?php echo date('F', mktime(0,0,0, $a->month, 1, $a->year));?></a></li>
    <?php endforeach;?>
    </ul>
</div>

</div>
<div id="" class="yui-u">

<div id="recent-sites" class="block">
<h4>Recent Web Sites</h4>
<p>
<?php
$links = get_bookmarks(array('category' => '36', 'orderby' => 'id', 'order' => 'DESC'));
?>
<?php foreach (array_slice($links, 0, 10) as $i => $link):?>
<a href="<?php echo $link->link_url;?>"><img src="#<?php echo makeThumbnail($link->link_url, 'S');?>" width="101" height="76" /><?php echo $link->link_name;?></a>, 
<?php endforeach;?>

<a href="/recent-web-sites/">and more</a>.<br />
<small class="desc">(sites I've worked on)</small>
</p>
</div>

<div id="joe" class="block">
<h4>Everything Joe</h4>
<p><?php get_links(32, '', ',', '', false, 'name', false, false); ?>
<a href="http://joetan.org">and my Lifestream</a>.<br />
<small class="desc">(my online links)</small>
</p>
</div>

<div id="blogroll" class="block">
<h4>Other Blogs of Note</h4>
<p><?php get_links(35, '', ',', '', false, 'rand', false, false); ?>
<a href="http://technorati.com/search/http://tantannoodles.com">and</a> <a href="http://blogsearch.google.com/blogsearch?hl=en&q=link%3Atantannoodles.com">others</a>.<br />
<small class="desc">(my friends online)</small>
</p>
</div>

</div>
</div>

<div id="site-feeds" class="block">
<h4>Subscribe to this Site</h4>
<p>Get notified when updates are made to this site! 
Just grab a link below and paste it into your favorite RSS reader. 
Click on a link to get a quick preview of the feed.
</p>


<ul class="feeds">
<li class="main"><a class="feed" rel="feed" href="http://feeds.feedburner.com/TanTanNoodles" title="Subscribe to main posts only">Subscribe to the Main Feed</a><br />
<span class="feed">Posts on the main homepage</span></li>
<li class="toolkit"><a class="feed" rel="feed" href="http://feeds.feedburner.com/TanTanToolkit" title="Tell me when updates are made to Joe's plugins and scripts">Subscribe to Toolkit Updates</a><br />
<span class="feed">Updates to WordPress plugins and other scripts</span></li>

<?php /*
<li class="music"><a class="feed" rel="feed"  href="http://feeds.feedburner.com/TanTanMusic" title="Free full-length MP3 tracks delivered to your iPod">Subscribe to the Music Podcast</a><br />
<span class="feed">Free full-length MP3 tracks</span></li>

<li class="distractions"><a href="http://feeds.feedburner.com/TanTanDistractions" title="Send me Random Distractions">Subscribe to Distraction Links</a><br />
<span class="feed">Random links to random places</span></li>
<li class="everything"><a href="http://feeds.feedburner.com/TanTanEverything" title="Give me Everything!">Subscribe to Everything TanTan</a><br />
<span class="feed">Everything as one feed</span></li>
<li class="xanga"><a href="http://www.xanga.com/joetan54" title="Subscribe to this site with Xanga">Subscribe with Xanga</a><br />
<span class="feed">Get updates via Xanga</span></li>
<li class="myspace"><a href="http://www.myspace.com/index.cfm?fuseaction=blog.confirmsubscribe&friendID=31938666" title="Subscribe to this site with MySpace">Subscribe with MySpace</a></li>
<li><a href="http://tantannoodles.com/comments/feed/" title="The latest comments to all posts in RSS">Comments <abbr title="Really Simple Syndication">RSS</abbr> 2.0</a></li>
<li><a href="http://feeds.feedburner.com/noodledistractions" title="tantannoodles.com distractions">Distractions Feed</a>
<li><img src="http://feeds.feedburner.com/~fc/tantannoodles?bg=99CCFF&amp;fg=444444&amp;anim=0" height="26" width="88" style="border:0" alt="" /></li>
<li><a href="http://tantannoodles.com/wp-content/plugins/miniblog.php?action=rss&amp;n=10&amp;o=0&amp;q=linkroll&amp;s=_Date&amp;t=tantannoodles.com+distractions&amp;d=%25site_description%25">Distractions RSS 2.0</a>
*/ ?>
</ul>
</div>

</div></div></div><!-- /sidebar -->